#import <Foundation/Foundation.h>
#import "BookItem.h"
#import "BookConstants.h"

@protocol CommonDetailWebServicesProtocol

- (void)onCommonDetailWebServicesOver:(NSDictionary *) dic;
- (void)onCommonDetailWebServicesFaild:(NSString *)error;

@end


@interface CommonDetailWebServices : NSObject {
	NSMutableData *webData;
	NSXMLParser *xmlParser;
	
	NSDictionary *data; //传出的数据集合
	
	NSString *columnName;//当前的栏目
	
	NSMutableArray *dataTable; //表格数据
	NSInteger dataType;
	NSMutableArray *element;   //中间缓存变量
	BookItem *bookItem;//资源详细数据
	
	
	NSString *itemValueTmp; //ITEM 临时值存放处
	
	BOOL isRowBegin;
	BOOL isValueBegin;
	NSObject<CommonDetailWebServicesProtocol> *owner;
}

@property (nonatomic, retain) NSMutableData *webData;
@property (nonatomic, retain) NSXMLParser *xmlParser;
@property (nonatomic, retain) NSDictionary *data;

@property (nonatomic, retain) NSMutableArray *dataTable;
@property (nonatomic) NSInteger dataType;
@property (nonatomic, retain) NSMutableArray *element;
@property (nonatomic, retain) BookItem *bookItem;

@property (nonatomic) BOOL isRowBegin;
@property (nonatomic) BOOL isValueBegin;
@property (nonatomic, retain) NSObject<CommonDetailWebServicesProtocol> *owner;

- (NSDictionary *)getWebServicesData:(NSString *)column page:(NSString *)page;
- (void)setDelegate:(NSObject<CommonDetailWebServicesProtocol> *)object;

@end
